from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, PasswordField
from wtforms.validators import DataRequired, Length, Email, EqualTo


class userAdd(FlaskForm):
    username = StringField(u'username', validators=[DataRequired(),])


    password = PasswordField(
        u'mima',
        validators=[DataRequired(), Length(6,16, message='MI MA GE SHI WRONG.')]
    )

    repassword = PasswordField(
        u'qu ren mima',
        validators=[DataRequired(),
                    EqualTo('password', message='Mi ma bu yizhi.')]
    )

    submit = SubmitField(label="Add")

